package com.example.homeworkmutualevaluation.DTO;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.sql.Timestamp;

@Data
public class DetailedTask {
    private int id;
    private String evaluator;
    private String submitter;
    private int homeworkid;
    private byte status; // 0:必须完成，当前未完成    1:可以不完成，当前未完成    2:已完成，并且合法    3:已完成，并且不合法
    private int score;
    private String comment;
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    private Timestamp datetime;
    public DetailedTask(int id, String evaluator, int homeworkid, byte status, int score, String comment, Timestamp datetime) {
        this.id = id;
        this.evaluator = evaluator;
        this.submitter = "unknown";
        this.homeworkid = homeworkid;
        this.status = status;
        this.score = score;
        this.comment = comment;
        this.datetime = datetime;
    }
}
